home *** CD-ROM | disk | FTP | other *** search
/ QuickTime for the Web (2nd Edition) / QuickTime for the Web (2nd Edition).iso / pc / AppleScript / QUICKTIME 5.0.2 SCRIPTS / Example Files / Chapter Examples / chapter properties next >
Encoding:
Text File  |  2001-06-04  |  1.2 KB  |  26 lines

  1. tell application "QuickTime Player"
  2.     
  3.     activate
  4.     if not (exists movie 1) then return "no movie"
  5.     stop every movie
  6.     tell movie 1
  7.         set this_track to current chapter track
  8.         if this_track is not {} then
  9.             set this_name to the name of this_track
  10.             set this_chapter to the current chapter
  11.             set the chapter_name to the name of this_chapter
  12.             set the chapter_index to the index of this_chapter
  13.             set the chapter_duration to the duration of this_chapter
  14.             set the chapter_start to the time of this_chapter
  15.             set the message_text to "Current Chapter Info" & return & return
  16.             set the message_text to the message_text & "Chapter Track Name: " & this_name & return
  17.             set the message_text to the message_text & "Current Chapter Name: " & chapter_name & return
  18.             set the message_text to the message_text & "Current Chapter Index: " & chapter_index & return
  19.             set the message_text to the message_text & "Current Chapter Start: " & (chapter_start as string) & return
  20.             set the message_text to the message_text & "Current Chapter Duration: " & (chapter_duration as string)
  21.         else
  22.             set the message_text to "The front movie has no chapter track."
  23.         end if
  24.         display dialog message_text buttons {"OK"} default button 1
  25.     end tell
  26. end tell